package managers;

import java.awt.print.PrinterException;
import javax.swing.JOptionPane;
import javax.swing.JTable;

public class Print {
	
	public Print(JTable table) {
		try {
			boolean complete = table.print(JTable.PrintMode.FIT_WIDTH);
			if(complete) {
				JOptionPane.showMessageDialog(null, 
						"Listen over medlemmer er sendt til printeren.");
			}else {
				JOptionPane.showMessageDialog(null, 
						"Print af listen blev annulleret.");
			}
		} catch(PrinterException pe) {
			pe.printStackTrace();
		}	
	}
}
